(ftfont_open): Fix checking of the return value of
authorKenichi Handa <handa@m17n.org>
Mon, 6 Apr 2009 07:56:47 +0000 (07:56 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 6 Apr 2009 07:56:47 +0000 (07:56 +0000)
FT_Load_Char.  Fix setting font->underline_thickness.

src/ftfont.c

index aa9777acf34fd5a3b1521859f6440473d64f3821..f515856bcba26ddfb49dcc73c9eda099af249aad 100644 (file)
@@ -1130,7 +1130,7 @@ ftfont_open (f, entity, pixel_size)
 
       font->min_width = font->average_width = font->space_width = 0;
       for (i = 32, n = 0; i < 127; i++)
-       if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
+       if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) == 0)
          {
            int this_width = ft_face->glyph->metrics.horiAdvance >> 6;
 
@@ -1153,7 +1153,7 @@ ftfont_open (f, entity, pixel_size)
   if (scalable)
     {
       font->underline_position = -ft_face->underline_position * size / upEM;
-      font->underline_thickness = -ft_face->underline_thickness * size / upEM;
+      font->underline_thickness = ft_face->underline_thickness * size / upEM;
     }
   else
     {